package com.ruicar.afs.cloud.bizcommon.voucher.mq.sender;

import com.ruicar.afs.cloud.bizcommon.voucher.mq.fallback.SendVoucherFlowFallBack;
import com.ruicar.afs.cloud.common.modules.dto.mq.voucher.VoucherFlowInfoDto;
import com.ruicar.afs.cloud.common.mq.rabbit.anno.send.AfsRabbitMqClient;
import com.ruicar.afs.cloud.common.mq.rabbit.anno.send.AfsRabbitMqSender;
import com.ruicar.afs.cloud.common.mq.rabbit.message.AfsTransEntity;

/**
 * <p>Description: 发送数据到核算服务</p>
 * @author infinity
 * @version 1.0
 * @date 2020/8/12 11:08
 */
@AfsRabbitMqClient
public interface VoucherFlowSender {

    /**
     * 凭证流水数据推送
     * @param entity 凭证流水数据推送
     * @return
     */
    @AfsRabbitMqSender(serverAlias = "${com.ruicar.afs.cloud.rabbitQueue.serverAlia}"
            ,exchangeName = "${com.ruicar.afs.cloud.rabbitQueue.exchangeName}"
            ,queueName = "${com.ruicar.afs.cloud.rabbitQueue.queueName.voucherFlowToAccount}"
            ,enableOn = "${com.ruicar.afs.cloud.rabbitQueue.exchangeName}"
            ,fallBack = SendVoucherFlowFallBack.class)
    void sendVoucherFlowToAccount(AfsTransEntity<VoucherFlowInfoDto> entity);
}
